<template>
	<view>

		<view class="item">

			<view class="text-line" style="margin-top: 20rpx;">
				<text class="text-name">原有月租金:</text>
				<text class="text-value">￥{{model.monthlyRentOld|filterNull}}</text>
			</view>

			<view class="text-line" v-if="2==type">
				<text class="text-name">原有保证金:</text>
				<text class="text-value">￥{{model.cashDepositOld|filterNull}}</text>
			</view>

			<view class="text-line" v-if="1==type">
				<text class="text-name">调整月租金为:</text>
				<text class="text-value">￥{{model.monthlyRentNew|filterNull}}</text>
			</view>

			<view v-for="(item, index) in model.feeItemList" :key="index">
				<view class="f-item">
					<u-line color="#efefef" :customStyle="{'display': 'block',}"></u-line>

					<view class="text-line" style="margin-top: 20rpx;">
						<text class="text-name">{{'monthly_rent'==item.typeCode?'类型:':'费用项:'}}</text>
						<text class="text-value">{{item.typeName|filterNull}}</text>
					</view>

					<view class="text-line">
						<text class="text-name">金额:</text>
						<text class="text-value">￥{{item.money|filterNull}}</text>
					</view>

					<view class="text-line">
						<text class="text-name">付款方式:</text>
						<text class="text-value">{{item.paymentMethodStr|filterNull}}</text>
					</view>

					<view class="text-line">
						<text class="text-name">{{'monthly_rent'==item.typeCode?'总期数:':'第一次付款日期:'}}</text>
						<text
							class="text-value">{{'monthly_rent'==item.typeCode?item.tenancy+'期':item.timePayment1st}}</text>
					</view>
				</view>
			</view>

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				reletId: '',
				orderCarId: '',
				type: '',
				model: {
					feeItemList: []
				}
			}
		},
		methods: {

		},
		onLoad(op) {
			this.reletId = op.reletId
			this.orderCarId = op.orderCarId
			this.type = op.type

			if (1 == this.type) {
				this.$u.api.alterationFeeDetail({
					orderCarId: this.orderCarId
				}).then(res => {
					this.model = res
				})

			} else {
				this.$u.api.releDetailInfo({
					reletId: this.reletId
				}).then(res => {
					this.model = res
				})
			}

		},

	}
</script>

<style lang="scss" scoped>
	.f-item {
		display: flex;
		flex-direction: column;
	}
</style>
